Imaging apparatus

ABSTRACT

An imaging apparatus includes an imaging unit to acquire image data, an integration unit to calculate a white balance integration value, a first calculation unit to calculate a still image white balance control value, a second calculation unit to calculate a histogram white balance control value, and a histogram processing unit. The second calculation unit calculates the histogram white balance control value by converting a white balance control value which is used in white balance processing on the image data acquired by the imaging unit in an electronic view finder (EVF) mode to the still image white balance control value, and the histogram processing unit adjusts color balance of the image data acquired by the imaging unit using the calculated histogram white balance control value and performs the histogram processing in parallel with calculation of the white balance integration value.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an imaging apparatus which calculates ahistogram.

2. Description of the Related Art

Recently, many digital cameras can generate a histogram in which imagedata is counted in terms of luminance. For example, Japanese PatentApplication Laid-Open No. 2002-84440 discusses a digital camera whichcan reduce the time necessary for histogram processing. In such adigital camera, the image data size is resized and reduced, and thehistogram is calculated based on the reduced image data. As a result,the time necessary for histogram processing is shortened.

Further, Japanese Patent Application Laid-Open No. 2003-244487 discussesa digital camera which can reduce a load on a system by efficientlyperforming histogram processing. Such a digital camera is controlled tocalculate the histogram when a shooting condition changes, so that aprocessing load is reduced.

The digital camera calculates the histogram from image data of a stillimage and optimizes signal processing settings according to theresulting histogram to improve image quality. However, time required forcalculating the histogram from the image data of the still image issimply added to time required for developing the still image, so thatperformance is lowered.

On the other hand, since the digital camera calculates the histogram toacquire a setting value for performing developing processing, image databefore developing processing is employed as an input image for histogramprocessing. However, color balance is not corrected in the image databefore developing processing, so that the resulting histogram does notcorrectly reflect the shooting condition.

SUMMARY OF THE INVENTION

The present invention is directed to a technique capable of performingappropriate histogram processing on captured image data withoutextending processing time for developing the captured image data.

According to an aspect of the present invention, an imaging apparatusincludes an imaging unit configured to capture an image of an object andacquire image data, an integration unit configured to calculate a whitebalance integration value for calculating a still image white balancecontrol value from the image data acquired by the imaging unit, a firstcalculation unit configured to calculate the still image white balancecontrol value using the white balance integration value calculated bythe integration unit, a second calculation unit configured to calculatea histogram white balance control value to be used in histogramprocessing, and a histogram processing unit configured to adjust colorbalance of the image data acquired by the imaging unit and performhistogram processing. The second calculation unit calculates thehistogram white balance control value by converting a white balancecontrol value which is used to perform white balance processing on theimage data acquired by the imaging unit in an electronic view finder(EVF) mode to the still image white balance control value, and thehistogram processing unit adjusts the color balance of the image dataacquired by the imaging unit using the calculated histogram whitebalance control value and performs the histogram processing in parallelwith calculation of the white balance integration value by theintegration unit.

Further features and aspects of the present invention will becomeapparent from the following detailed description of exemplaryembodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate exemplary embodiments, features,and aspects of the invention and, together with the description, serveto explain the principles of the invention.

FIG. 1 is a block diagram illustrating an imaging apparatus.

FIG. 2 is a flowchart illustrating a main operation of an imagingapparatus.

FIG. 3 is a flowchart illustrating a still image shooting processperformed by an imaging apparatus.

FIG. 4 is a flowchart illustrating a still image shooting processperformed by an imaging apparatus.

FIG. 5 is a flowchart illustrating a still image shooting processperformed by an imaging apparatus.

FIG. 6 illustrates a timing chart of a still image shooting processperformed by an imaging apparatus.

FIG. 7 illustrates an example of a table indicating predetermined colortemperatures corresponding to user settings.

DESCRIPTION OF THE EMBODIMENTS

Various exemplary embodiments, features, and aspects of the inventionwill be described in detail below with reference to the drawings.

FIG. 1 illustrates a configuration of an imaging apparatus according toan exemplary embodiment of the present invention.

An imaging apparatus 100 includes a protection unit 102, photographiclens 10, a shutter 12, an image sensor 14, an analog to digital (A/D)converter 16, a timing generation circuit 18, and an image processingcircuit 20. The protection unit 102 serves as a cover to protect animaging unit including the photographic lens 10 from soiling andbreakage. The shutter 12 includes a diaphragm function. The image sensor14 converts an optical image to electric signals. The A/D converter 16coverts an analog signal output from the image sensor 14 to a digitalsignal. The timing generation circuit 18 supplies a clock signal and acontrol signal to the image sensor 14, the A/D converter 16, and adigital to analog (D/A) converter 26. The timing generation circuit 18is controlled by a memory control circuit 22 and a system control unit50.

The image processing circuit 20 performs predetermined pixelinterpolation and color conversion on data received from the A/Dconverter 16 or the memory control circuit 22. Further, the imageprocessing circuit 20 performs a predetermined calculation using thecaptured image data. Furthermore, the image processing circuit 20performs a predetermined calculation using the captured image data andthrough-the-lens (TTL) auto-white balance (AWB) processing based on thecalculation result. In white balance processing, block integration isperformed by dividing a video signal into a plurality of blocks andacquiring an integration value of a color signal for each block tocalculate the white balance. Further, white search integration isperformed by converting a signal value of each pixel in the video signalonto a chromaticity coordinate and acquiring an integration value of thecolor signal for a predetermined region. A setting of an integrationregion on the chromaticity coordinate which is used in the white searchintegration is stored in the image processing circuit 20.

The imaging apparatus 100 further includes the memory control circuit22, an image display memory 24, the D/A converter 26, and an imagedisplay unit 28.

The memory control circuit 22 controls the A/D converter 16, the timinggeneration circuit 18, the image processing circuit 20, the D/Aconverter 26, a memory 30 and a compression/decompression circuit 32.The data of the A/D converter 16 is written in the image display memory24 or the memory 30 via the image processing circuit 20 and the memorycontrol circuit 22, or via the memory control circuit 22.

The image display unit 28 is, for example, a thin-film transistor (TFT)liquid crystal display (LCD). Image data for display which is written inthe image display memory 24 is displayed on the image display unit 28via the D/A converter 26. An electronic finder function can beimplemented by sequentially displaying the captured image data using theimage display unit 28. Further, the image display unit 28 canarbitrarily switch a display screen on and off according to aninstruction from a system control unit 50. If the image display unit 28turns off the display, power consumption of the imaging apparatus 100can be greatly reduced.

The imaging apparatus 100 further includes the memory 30, thecompression/decompression circuit 32, an exposure control unit 40, afocusing control unit 42, a zoom control unit 44, a barrier control unit46, a flash unit 48, and the system control unit 50.

The memory 30 stores captured still images and moving images. The memory30 has a storage capacity large enough to store a predetermined numberof still images and a moving image corresponding to a predeterminedperiod of time. Therefore, a large amount of image data can be writtenin the memory 30 at high speed in both a continuous shooting mode ofcontinuously shooting a plurality of still images and a panoramashooting mode. Further, the memory 30 can be used as a work area of thesystem control unit 50.

The compression/decompression circuit 32 compresses and decompresses theimage data using adaptive discrete cosine transform (ADCT). Thecompression/decompression circuit 32 reads an image stored in the memory30 and compresses or decompresses the image, and writes the processeddata in the memory 30.

The system control unit 50 controls the entire imaging apparatus 100.The exposure control unit 40 controls the shutter 12 which includes thediaphragm function. Further, the exposure control unit 40 includes aflash light amount control function in cooperation with the flash unit48. The focusing control unit 42 controls focusing of the photographiclens 10. The exposure control unit 40 and the focusing control unit 42are controlled by a TTL system.

More specifically, the system control unit 50 performs auto-focus (AF)processing, automatic exposure (AE) processing, and electronic flashpre-emission (EF) processing according to the TTL system by controllingthe exposure control unit 40 and the focusing control unit 42 based on acalculation result obtained by the image processing unit 20. The zoomcontrol unit 44 controls zooming of the photographic lens 10. Thebarrier control unit 46 controls an operation of the protection unit102. The flash unit 48 includes a function of emitting AF auxiliarylight and the light amount control function.

Moreover, the imaging apparatus 100 includes a memory 52, a display unit54, and a non-volatile memory 56.

The memory 52 stores constants, variables, and programs to be used inoperations of the system control unit 50. Further, the memory 52 storesa program diagram to be used in the AE processing. The program diagramis a table which defines a relationship between an aperture diaphragmdiameter corresponding to an exposure value and a control value ofshutter speed.

The display unit 54 may include an LCD or a speaker which displays anoperation state or a message using characters, images, and soundaccording to execution of a program by the system control unit 50. Onedisplay unit 54 or a plurality of display units 54 may be provided nearan operation unit 63 of the imaging apparatus 100 so that it is easilyvisible for a user. The display unit 54 may be configured as acombination of an LCD, a light-emitting diode (LED), and a soundgenerator. A part of the functions of the display unit 54 is installedwithin an optical finder 104.

Display contents of the display unit 54 which are displayed on the LCDmay include indications of single shot/continuous shooting, self timer,a compression rate, a number of recorded pixels, a number of recordedshots, a remaining number of shots, a shutter speed, an aperture value,and exposure correction. Further, the display unit 54 may display on theLCD, indications such as, flash, red-eye reduction, macro shooting,buzzer setting, remaining amount of a clock battery, remaining amount ofbatteries, error information, information in a plurality of digits, adetached/attached state of a recording medium, a communication interfaceoperation, and date and time.

The display contents of the display unit 54 which are displayed in theoptical finder 104 may include indications of in-focus, camera-shakewarning, flash charge, shutter speed, aperture value, and exposurecorrection.

The non-volatile memory 56 is an electrically erasable and recordablememory such as an electrically erasable programmable read-only memory(EEPROM).

The imaging apparatus 100 further includes a mode dial 60, a shutterswitch (SW1) 61, a shutter switch (SW2) 62, and the operation unit 63which are input units for a user to input various operation instructionsto the system control unit 50. Such input units are configured with asingle device such as a switch, a dial, a touch panel, pointing usingline-of-sight detection, and a speech recognition apparatus or acombination of a plurality of these devices.

The mode dial 60 can be used to specify switching between functionalmodes such as power off, automatic shooting mode, shooting mode,panoramic shooting mode, reproduction mode, multiple screenreproducing/erasing mode, and personal computer (PC) connection mode.

The shutter switch (SW1) 61 is switched on by a half stroke of a shutterbutton (not illustrated) and instructs start of AF processing, AEprocessing, AWB processing, and EF processing.

The shutter switch (SW2) 62 is switched on by a full stroke of theshutter button (not illustrated) and instructs start of a series ofprocessing. The series of processing include exposure processing towrite signals read from the image sensor 14 into the memory 30 via theA/D converter 16 and the memory control circuit 22, developingprocessing employing calculations performed by the image processingcircuit 20 and the memory control circuit 22, and recording processing.In the recording processing, the image data read from the memory 30 iscompressed by the compression/decompression circuit 32 and then writteninto the recording media 200 and 210.

The operation unit 63 includes various buttons and touch panels, such asa menu button, a set button, a macro selection button, a multi-screenreproduction and page-advance button, a flash setting button, and asingle-shot/serial-shot/self-timer selection button. Further, theoperation unit 63 includes a forward (+) menu item selection button, abackward (−) menu item selection button, a forward (+) reproductionimage search button, a backward (−) reproduction image search button, ashooting quality selection button, an exposure correction button, and adate/time set button.

The imaging apparatus 100 further includes a power supply control unit80, connectors 82 and 84, a power supply 86, interfaces 90 and 94, theoptical finder 104, a communication unit 110, a connector (antenna) 112,and a recording medium attachment/detachment state detection unit 98.

The power supply control unit 80 includes a battery detection circuit, adirect current (DC)-DC converter, and a switch circuit for switching theblocks to be energized. The power supply control unit 80 detects theattached/detached state of the battery, a battery type and the remainingbattery power level, and controls the DC-DC converter based on thedetection result and an instruction from the system controller 50. Thepower supply control unit 80 then supplies a necessary voltage for anecessary period to each of the units including the recording medium.The power supply 86 may include a primary battery such as an alkalinebattery or a lithium battery, a secondary battery such as a BNiCdbattery, an NiMH battery, or an Li battery, and an alternate current(AC) adapter.

Interfaces 90 and 94 transmit and receive data to and from the recordingmedia 200 and 210 such as a memory card or a hard disk. The connectors92 and 96 connect the imaging apparatus 100 and the recording media 200and 210. The recording medium attachment/detachment detection unit 98detects whether the recording medium 200 or the recording medium 210 isconnected to the connector 92 or the connector 96. The present exemplaryembodiment describes a case where there are two systems of interfacesand connectors for attaching the recording medium. However, there can beany number of systems of interfaces and connectors for attaching therecording medium. Further, interfaces and connectors pursuant todifferent standards may be combined.

Cards in conformity with Personal Computer Memory Card InternationalAssociation standards (PCMCIA cards) or cards in conformity with compactflash (CF) card standards may be used as the interfaces and connectors.In such a case, various communication cards such as a local area network(LAN) card, a modem card, a universal serial bus (USB) card, anInstitute of Electrical and Electronics Engineers (IEEE) 1394 card, aP1284 card, a small computer system interface (SCSI) card, and apersonal handyphone system (PHS) are connected. According to thisconfiguration, image data and management information attached to theimage data can be transmitted and received between other peripheraldevices such as a computer and a printer.

The optical finder 104 is a window for confirming an object to becaptured without using the electronic viewfinder function of the imagedisplay unit 28. A part of the functions of the display unit 54including an indication of in-focus state, a camera shake warning, aflash charge state, a shutter speed, an aperture value, and exposurecorrection are displayed inside the optical finder 104.

The communication unit 110 includes various communication functions suchas Recommended Standard (RS) 232C, USB, IEEE 1394, P1284, SCSI, modem,LAN, and wireless communication.

The connector (antenna) 112 connects the imaging apparatus 100 withother devices via the communication unit 110. The connector 112functions as an antenna when performing wireless communication.

The recording media 200 and 210 such as the memory card or the hard diskare detachably attached to the imaging apparatus 100. The recordingmedia 200 and 210 include recording units 202 and 212 configured by asemiconductor memory or a magnetic disk, and interfaces 204 and 214respectively. Further, the recording media 200 and 210 includesconnectors 206 and 216 for connecting with the imaging apparatus 100.

Operation processing of the imaging apparatus 100 according to thepresent exemplary embodiment will be described below with reference toFIGS. 2, 3, and 4. The processing illustrated in the flowcharts of FIGS.2, 3, and 4 are realized by the system control unit 50 executing aprogram stored in the memory 52.

The processing performed before the imaging apparatus captures an imagewill be described below with reference to FIG. 2. The processing isstarted by switching on the imaging apparatus 100, for example, bychanging the battery.

In step S201, the system control unit 50 initializes flags and controlvariables. In step S202, the system control unit 50 initializes theimage display unit 28 to a display off state.

In step S203, the system control unit 50 determines whether the modedial 60 is set to a power supply off position, a shooting mode position,or other mode position. If the mode dial 60 is set to the power supplyoff position (POWER OFF in step S203), the processing proceeds to stepS205.

In step S205, the system control unit 50 ends displaying on each displayunit and closes the barrier of the protection unit 102 to protect theimaging unit. Further, the system control unit 50 records necessaryparameters and setting values including the flags and the controlvariables, and setting modes in the non-volatile memory 56. Furthermore,the power supply control unit 80 performs predetermined shut downprocessing, such as shutting down unnecessary power supplies of each ofthe units in the imaging apparatus 100 including the image display unit28. The processing then returns to step S203.

If the mode dial 60 is set to other mode position in step S203 (OTHERMODE in step S203), the processing proceeds to step S204. In step S204,the system control unit 50 executes the processing according to theselected mode. The processing then returns to step S203. Further, if themode dial 60 is set to the shooting mode in step S203 (SHOOTING MODE instep S203), the processing proceeds to step S206.

In step S206, the system control unit 50 determines, using the powersupply control unit 80, whether the remaining amount or the operatingstate of the power supply 86 may cause adverse effects on the operationof the imaging apparatus 100. If there is a problem with the powersupply 86 (NO in step S206), the processing proceeds to step S208. Instep S208, the system control unit 50 outputs a predetermined warningwith an image or sound using the display unit 54, and the processingreturns to step S203. On the other hand, if there is no problem (YES instep S206), the processing proceeds to step S207.

In step S207, the system control unit 50 determines whether theoperating state of the recording media 200 and 210 may cause adverseeffects on the operation of the imaging apparatus 100, particularly, onthe operation for recording or reproducing the image data thereto ortherefrom. If there is a problem with the recording media 200 and 210(NO in step S207), the processing proceeds to step S208 in which theabove-described predetermined warning is output, and the processing thenreturns to step S203. If there is no problem (YES in step S207), theprocessing proceeds to step S209.

In step S209, the system control unit 50 determines whether the findermode is set to an optical view finder (OVF) mode, or more specifically,whether the finder mode is set to the OVF mode or an electronic viewfinder (EVF) mode.

The OVF mode is a mode for confirming the object to be shot using theoptical finder 104. On the contrary, the EVF mode is a mode forconfirming the object to be shot by displaying a through-the-lens imageon the image display unit 28 as the finder function. Thethrough-the-lens image is a moving image captured by the image sensor 14before and after shooting the still image.

If the system control unit 50 determines that the finder mode is set tothe OVF mode (YES in step S209), the processing proceeds to theflowchart illustrated in FIG. 3 without displaying the through-the-lensimage. On the other hand, if the system control unit 50 determines thatthe finder mode is set to the EVF mode (NO in step S209), the processingproceeds to step S210.

In step S210, the system control unit 50 initializes shootingpreparation processing to display the through-the-lens image on theimage display unit 28.

In step S211, the system control unit 50 starts display of thethrough-the-lens image via the image display unit 28 after completingthe shooting preparation. When the through-the-lens image is displayed,the image data is sequentially written in the image display memory 24via the image sensor 14, the A/D converter 16, the image processingcircuit 20, and the memory control circuit 22. The written image data isthen sequentially displayed on the image display unit 28 via the memorycontrol circuit 22 and the D/A converter 26 to realize an electronicview finder function.

The camera operation for performing still image shooting by displayingthe through-the-lens image will be described below with reference toFIGS. 3, 4, and 5.

In step S301, the system control unit 50 determines whether the modedial 60 is changed. If the mode dial 60 is changed (YES in step S301),the processing returns to step S203 in FIG. 2. If the mode dial 60 isnot changed (NO in step S301), the processing proceeds to step S302.

In step S302, the system control unit 50 determines whether the OVF modeis set, or more specifically, whether the OVF mode or the EVF mode isset. If the OVF mode is set (YES in step S302), the processing proceedsto step S306. If the EVF mode is set (NO in step S302), the processingproceeds to step S303.

In step S303, the system control unit 50 performs processing forcontinuing to display the through-the-lens image. For example, thesystem control unit 50 performs a predetermined photometry calculationon an image signal which the image processing circuit 20 acquired fromthe image sensor 14. The system control unit 50 then stores acalculation result in the memory 30, or performs AE processing on thethrough-the-lens image using the exposure control unit 40 based on thecalculation result.

In step S304, the system control unit 50 performs white balanceprocessing in the EVF mode. More specifically, the system control unit50 performs a predetermined white balance calculation on the imagesignal that the image processing circuit 20 acquired from the imagesensor 14 and stores the calculation result in the memory 30. The systemcontrol unit 50 then sets a white balance control value on the imageprocessing circuit 20 based on the calculation result and performs thewhite balance processing on the through-the-lens image.

In step S305, the system control unit 50 displays on the image displayunit 28 the through-the-lens image on which white balance processing hasbeen performed.

In step S306, the system control unit 50 determines whether a userpressed the shutter switch (SW1) 61. If the user has not pressed theshutter switch (SW1) 61 (OFF in step S306), the processing returns tostep S203 in FIG. 2. If the user pressed the shutter switch (SW1) 61 (ONin step S306), the processing proceeds to step S307.

In step S307, the system control unit 50 performs a predeterminedfocusing calculation on the image signal that the image processingcircuit 20 acquired from the image sensor 14 and stores the calculationresult in the memory 30. The system control unit 50 then performs AFprocessing based on the calculation result by the focusing control unit42 and adjusts an in-focus point of the photographic lens 10 on theobject.

In step S308, the system control unit 50 displays the through-the-lensimage on the image display unit 28.

In step S309, the system control unit 50 determines whether the userpressed the shutter switch (SW2) 62. If the user has not pressed theshutter switch (SW1) 62 (OFF in step S306), the processing proceeds tostep S310. In step S310, the system control unit 50 determines whetherthe user pressed the shutter switch (SW1) 61. If the user has notpressed the shutter switch (SW1) 61 (OFF in step S310), the processingreturns to step S203 in FIG. 2. If the user pressed the shutter switch(SW1) 61 (ON in step S310), the processing returns to step S308.

If the user pressed the shutter switch (SW2) 62 (ON in step S309), theprocessing proceeds to step S311.

In step S311 to step S313, the system control unit 50 executes the stillimage shooting process in which a series of shooting operations isperformed.

In step S311, the system control unit 50 performs the still imageshooting processing using a method described below with reference toFIG. 4.

In step S312, the system control unit 50 writes the compressed imagedata stored in the memory 30 in step S311 into the storage medium 200 asa still image file.

In step S313, the system control unit 50 displays the image data shot instep S311 as an image on the image display unit 28 and ends the stillimage shooting processing.

In step S314, the system control unit 50 determines whether the userpressed the shutter switch (SW1) 61. If the user pressed the shutterswitch (SW1) 61 (ON in step S314), the processing returns to step S308,and the system control unit 50 display the through-the-lens image andreturns to a shooting standby state. If the user has not pressed theshutter switch (SW1) 61 (OFF in step S314), the processing returns tostep S203 in FIG. 2.

The still image shooting processing will be described below withreference to the flowchart illustrated in FIG. 4. The processingcorresponds to the processing performed in step S311 in the flowchartillustrated in FIG. 3.

In step S401, the system control unit 50 starts reading the imagesignals from the image sensor 14 in synchronization with the timinggeneration circuit 18. If flash photography is performed as a result ofthe AE processing in step S303, the system control unit 50 flashes theflash 48 in synchronization with a first curtain or a second curtain ofthe image signals. The system control unit 50 then converts the imagesignals that are sequentially readout from the image sensor 14 to theimage data via the A/D converter 16 and sequentially stores theconverted image data in the memory 30.

In step S402, the system control unit 50 performs integration processingin parallel with reading the image signals in step S401. Morespecifically, the system control unit 50 divides the screen into aplurality of blocks and calculates an integration value (i.e., a whitebalance value) of the signal level for each block. The system controlunit 50 uses the calculated integration value in the white balanceprocessing described below.

More specifically, the system control unit 50 reads the image datastored in the memory 30 which is read from the image sensor 14, performsintegration processing thereon using the image processing circuit 20,and stores integration result data in the memory 30. The system controlunit 50 performs such processing with a little time lag from performingthe process of step S401.

In step S403, the system control unit 50 determines whether the stillimage shooting is performed in the OVF mode. If the still image shootingis performed in the OVF mode (YES in step S403), the processing proceedsto step S405. On the other hand, if the still image shooting isperformed in the EVF mode (NO in step S403), the processing proceeds tostep S404.

In step 404, which is performed when the still image shooting isperformed in the EVF mode, the system control unit 50 acquires from thememory 30 the white balance control value for the EVF mode calculated instep S304 illustrated in FIG. 3. The system control unit 50 thenconverts the acquired white balance control value for the EVF mode to awhite balance control value for performing still image shooting. Morespecifically, the image sensor 14 is controlled differently whenshooting the image in the EVF mode and when shooting a still image, sothat the balance of sensitivity for each color is different in the imagesensor 14. Therefore, the white balance control value calculated in theEVF mode cannot be applied as it is to the white balance value for thestill image shooting.

The system control unit 50 thus applies a unique conversion coefficientto the image sensor 14 and converts the white balance control value forthe EVF mode to the white balance value for performing the still imageshooting. Since the acquired white balance control value for performingthe still image shooting is an approximate value calculated from thewhite balance control value for the EVF mode, the acquired white balancecontrol value is only used to optimize the color balance in a histogramdescribed below. On the contrary, a white balance control valuecalculated by performing white balance processing for the still imagedescribed below is used for performing developing progressing on thestill image.

The system control unit 50 then stores in the memory 30 the whitebalance control value converted for performing the still image shootingas the white balance control value for the histogram.

On the other hand, the processing in step S405 is performed when thestill image is shot in the OVF mode, so that the white balance controlvalue for the EVF mode cannot be acquired. The system control unit 50thus determines a default white balance control value according to auser setting value of the white balance stored in the non-volatilememory 56.

An example of a relation between the user setting value of the whitebalance and the default white balance control value will be describedbelow with reference to FIG. 7. Referring to FIG. 7, a table 701includes color temperatures corresponding to user setting values of thewhite balance. The color temperature and the white balance control valuecan be mutually converted by performing a predetermined calculation. Thewhite balance control value can thus be determined by referring to thecolor temperature corresponding to the user setting value of the whitebalance illustrated in the table 701.

In the table 701, when the user setting of the white balance isautomatic, two setting values are specified for high luminance and lowluminance and are switched between the two settings according to objectluminance. The user settings of the white balance other than theautomatic setting each corresponds to one color temperature, so that onewhite balance control value can be determined. The white balance controlvalue which is thus determined based on the user setting is only used inoptimizing the color balance in the histogram described below. On thecontrary, a white balance control value calculated by performing whitebalance processing for the still image described below is used forperforming developing progressing on the still image.

The system control unit 50 then stores in the memory 30 the whitebalance control value determined based on the table 701 as the whitebalance control value to be used on the histogram.

In step S406, the system control unit 50 sets the white balance controlvalue to be used on the histogram acquired in step S404 or 5405 to ahistogram circuit in the image processing circuit 20. There is a circuitwhich applies a gain for each color in an input setting of the histogramcircuit in the image processing circuit 20. The color balance of theimage input in the histogram circuit can thus be appropriately adjustedby setting the white balance control value for the histogram.

In step S407, the system control unit 50 starts performing histogramprocessing. More specifically, the system control unit 50 sequentiallyinputs to the image processing circuit 20 the image data stored in thememory 30 and writes a histogram calculation result in the memory 30.The processing then proceeds to step S408.

In step S408, the system control unit 50 waits for completion of theintegration processing started in step S402. When the integrationprocessing is completed, the processing proceeds to step S409.

In step S409, the system control unit 50 performs white balanceprocessing for the still image. More specifically, the system controlunit 50 reads from the memory 30 the integration processing resultacquired in step S402 and calculates the white balance control value forthe still image by executing a predetermined white balance calculation.The system control unit 50 stores the white balance control value forthe still image in the memory 30. The system control unit 50 thenperforms the white balance processing on the image data stored in thememory 30 using the calculated white balance control value.

In step S410, the system control unit 50 waits for the completion of thehistogram processing started in step S407. When the histogram processingis completed, the processing proceeds to step S411.

In step S411, the system control unit 50 generates parameters to be setfor developing processing. The processing performed in step S411 will bedescribed below with reference to FIG. 5.

In step S412, the system control unit 50 instructs the image processingcircuit 20 to perform developing processing, i.e., a series ofprocessing including performing predetermined developing processing andcompression based on Joint Photographic Experts Group (JPEG) and storingthe processed image data in the memory 30. Upon the system control unit50 causing the image processing circuit 20 to store the processed imagedata in the memory 30, the series of developing processing ends.

The processing for generating the developing parameters will bedescribed below with reference to the flowchart illustrated in FIG. 5.The processing corresponds to the processing performed in step S411 inthe flowchart illustrated in FIG. 4.

In step S501, the system control unit 50 calculates a saturatedluminance value from the result of histogram processing performed instep S407. More specifically, the system control unit 50 reads from thememory 30 the result of histogram processing performed in step S407,detects a luminance value which corresponds to 99% of a cumulativehistogram, and stores in the memory 30 the detected value as thesaturated luminance.

In step S502, the system control unit 50 calculates a difference betweena target saturated luminance and the saturated luminance value stored inthe memory 30 as a gain. The gain is calculated using the followingequation:

Gain=target saturated luminance/saturated luminance value

The gain is limited between 1.0 and 1.4.

In step S503, the system control unit 50 refers to the result of thehistogram processing stored in the memory 30 and searches for a highluminance histogram. More specifically, the system control unit 50defines a luminance which is equal to or greater than 200 in a range ofan 8-bit gradation (0 to 255) as high luminance and searches whether thehistogram appears at luminance values equal to or greater than athreshold value.

In step S504, the system control unit 50 determines whether there is ahigh luminance histogram. If there is a high luminance histogram (YES instep S504), the processing proceeds to step S506. On the other hand, ifthere is no high luminance histogram (NO in step S504), the processingproceeds to step S505.

In step S505, the system control unit 50 determines that the highluminance histogram does not appear due to a low contrast image whichdoes not fully use the dynamic range. The system control unit 50 thussets the gain calculated in step S502 to the image processing circuit20. The processing then proceeds to step S506.

In step S506, the system control unit 50 sets the developing parametersother than the gain. More specifically, the system control unit 50 setspredetermined values in the image processing circuit 20 as thedeveloping parameters such as sharpness. The processing for generatingthe developing parameters thus ends.

A timing chart which illustrates the still image shooting processing ina chronological order will be described below with reference to FIG. 6.

As illustrated in FIG. 6, according to the present exemplary embodiment,histogram processing 603 is performed in parallel with reading the videosignal (i.e., reading from sensor 601) and performing integrationprocessing (i.e., integration 602). As a result, the histogramprocessing can be performed without delaying the developing processingto start (i.e., developing processing 604) and thus without extendingthe entire development time. Further, the histogram processing can becorrectly performed from the video signal of the still image byexecuting the white balance processing for the histogram.

As described above, the histogram can be generated without extending thedevelopment time of the still image, and a correct histogram can begenerated from the video signal of the still image.

According to the present exemplary embodiment, an image quality can beimproved by calculating the histogram from the shot image and optimizingthe settings for image processing according to the result of performinghistogram processing. Such histogram processing can be performed withoutextending the time for developing still image. Further, when thehistogram is calculated, a correct histogram which takes into accountshooting conditions and device characteristics can be acquired byadjusting the color balance.

The present exemplary embodiment is described based on an example inwhich the user setting value of the white balance is automatic,sunlight, and the like. However, the user setting value of the whitebalance is not limited to the above-described examples, and the whitebalance control value for the histogram can be calculated based on othershooting conditions and settings of the imaging apparatus. For example,if the imaging apparatus is set to a manual white balance mode in whichthe user designates the color temperature, the white balance controlvalue for the still image is fixed, so that it is not necessary to usethe white balance control value of the EVF mode. In other words, thefixed white balance control value can be used as the white balancecontrol value for the histogram.

Further, if the imaging apparatus is set so that the user adjusts thewhite balance using white paper as a target, a white balance controlvalue targeted on the white paper can be applied as the white balancecontrol value for the histogram.

Furthermore, if the white balance control value for the EVF mode is usedin performing flash photography, the control value becomes totallydifferent from the white balance control value of the shot image.Therefore, when it is determined that flash photography is set to theimaging apparatus, the system control unit 50 uses the color temperatureof the flash illustrated in the table 701 to calculate the white balancecontrol value.

Moreover, if the white balance control value for the EVF mode is notstable, processing similar to the processing in step S405 illustrated inFIG. 4 can be performed. More specifically, the system control unit 50determines in step S304 illustrated in FIG. 3 whether the white balancecontrol value is stable when the white balance processing is performedon the through-the-lens image in the EVF mode. If it is determined thatthe white balance control value is not stable, the system control unit50 calculates the white balance control value using the colortemperatures described in the table 701 illustrated in FIG. 7.

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiment (s), and by a method, the steps ofwhich are performed by a computer of a system or apparatus by, forexample, reading out and executing a program recorded on a memory deviceto perform the functions of the above-described embodiment(s). For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (e.g., computer-readable medium).

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all modifications, equivalent structures, and functions.

This application claims priority from Japanese Patent Application No.2009-033074 filed Feb. 16, 2009, which is hereby incorporated byreference herein in its entirety.

1. An imaging apparatus comprising: an imaging unit configured tocapture an image of an object and acquire image data; an integrationunit configured to calculate a white balance integration value forcalculating a still image white balance control value from the imagedata acquired by the imaging unit; a first calculation unit configuredto calculate the still image white balance control value using the whitebalance integration value calculated by the integration unit; a secondcalculation unit configured to calculate a histogram white balancecontrol value to be used in histogram processing; and a histogramprocessing unit configured to adjust color balance of the image dataacquired by the imaging unit and perform histogram processing, whereinthe second calculation unit calculates the histogram white balancecontrol value by converting a white balance control value which is usedto perform white balance processing on the image data acquired by theimaging unit in an electronic view finder (EVF) mode to the still imagewhite balance control value, and wherein the histogram processing unitadjusts the color balance of the image data acquired by the imaging unitusing the calculated histogram white balance control value and performsthe histogram processing in parallel with calculation of the whitebalance integration value by the integration unit.
 2. The imagingapparatus according to claim 1, further comprising a white balanceprocessing unit configured to perform white balance processing using thestill image white balance control value calculated by the firstcalculation unit.
 3. The imaging apparatus according to claim 1, furthercomprising a stability determination unit configured to determinewhether the white balance control value which is used to perform thewhite balance processing on the image data acquired by the imaging unitin the EVF mode is stable, wherein, if the stability determination unitdetermines that the white balance control value is not stable, thesecond calculation unit sets a default white balance control value asthe histogram white balance control value based on a shooting conditionor a setting of the imaging apparatus.
 4. The imaging apparatusaccording to claim 1, wherein the second calculation unit employs adefault white balance control value as the histogram white balancecontrol value based on a shooting condition or a setting of the imagingapparatus.
 5. The imaging apparatus according to claim 4, wherein thesecond calculation unit employs, if the image data acquired by theimaging unit is image data acquired by flash photography, the defaultwhite balance control value as the histogram white balance controlvalue.
 6. The imaging apparatus according to claim 4, wherein the secondcalculation unit employs, if the imaging apparatus is set to adjustwhite balance using white paper as a target, a white balance controlvalue which is acquired using the white paper as a target, as thehistogram white balance control value.
 7. The imaging apparatusaccording to claim 4, wherein the second calculation unit employs, ifthe imaging apparatus is set to manual white balance in which a whitebalance control value is fixed by designating a color temperature, afixed white balance control value as the histogram white balance controlvalue.
 8. The imaging apparatus according to claim 2, further comprisinga developing processing unit configured to perform developing processingon the image data on which the white balance processing unit performsthe white balance processing, wherein the developing processing unitperforms developing processing based on a developing parametercalculated based on a result of the histogram processing performed bythe histogram processing unit.
 9. A method for performing imageprocessing comprising: capturing an image of an object and acquiringimage data; calculating a white balance integration value forcalculating a still image white balance control value from the acquiredimage data; calculating the still image white balance control valueusing the calculated white balance integration value; calculating ahistogram white balance control value to be used in histogramprocessing; adjusting color balance of the acquired image data andperforming the histogram processing; calculating the histogram whitebalance control value by converting a white balance control value whichis used to perform white balance processing on the acquired image datain an EVF mode to the still image white balance control value; andadjusting the color balance of the acquired image data using thecalculated histogram white balance control value and performing thehistogram processing, in parallel with calculating the white balanceintegration value.
 10. A program for executing a method comprising:capturing an image of an object and acquiring image data; calculating awhite balance integration value for calculating a still image whitebalance control value from the acquired image data; calculating thestill image white balance control value using the calculated whitebalance integration value; calculating a histogram white balance controlvalue to be used in histogram processing; adjusting color balance of theacquired image data and performing the histogram processing; calculatingthe histogram white balance control value by converting a white balancecontrol value which is used to perform white balance processing on theacquired image data in an EVF mode, to the still image white balancecontrol value; and adjusting the color balance of the acquired imagedata using the calculated histogram white balance control value andperforming the histogram processing, in parallel with calculating thewhite balance integration value.